import request from '../utils/request.js'

/**
 * 查询全部
 * @returns {*}
 */
export  const showAll=()=>{
      return request({
          url:"student/selectAll",
          method:"get"
      })
}
/**
 *  根据id删除
 * @returns {*}
 */
export  const deleteById=(id)=>{
    return request({
        url:`student/deleteById/${id}`,
        method:"delete"
    })
}
/**
 *  新增
 * @returns {*}
 */
export  const add=(data)=>{
    return request({
        url:`student/add`,
        method:"post",
        data
    })
}
/**
 *  修改
 * @returns {*}
 */
export  const updateById=(data)=>{
    return request({
        url:`student/updateById`,
        method:"put",
        data
    })
}

/**
 * 条件查询
 */
export  const selectByCondition=(queryDto,currentPage,pageSize)=>{
    return request({
        url:`student/selectByCondition/${currentPage}/${pageSize}`,
        method:"get",
        params:queryDto
    })
}


/**
 * 分页查询
 */
export  const selectByPage=(currentPage,pageSize)=>{
    return request({
        url:`student/selectByPage/${currentPage}/${pageSize}`,
        method:"get",
    })
}
